package com.amit.hibernate;



import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

public class Lab33 {

	public static void main(String[] args) {
		
		
		SessionFactory sessionfactory=Chibernateutil.getfactory();
		Session session=sessionfactory.openSession();
		Transaction tx=session.beginTransaction();
		Customer cust=new Customer("amit", "amit@gmail.com", 1234);
		Integer it=(Integer) session.save(cust);
		System.out.println(it.intValue());
		
		tx.commit();
		session.close();

	}

}
